package org_enum

// 组织-组织级别
type orgOrganizationLevel int

var OrgOrganizationLevel orgOrganizationLevel

// 国家级
func (c *orgOrganizationLevel) Country() int {
	return 1
}

// 省级
func (c *orgOrganizationLevel) Province() int {
	return 2
}

// 地市
func (c *orgOrganizationLevel) City() int {
	return 3
}

// 县区
func (c *orgOrganizationLevel) Area() int {
	return 4
}

func (c *orgOrganizationLevel) ToText(value int) string {
	switch value {

	case 1:
		return "国家级"

	case 2:
		return "省级"

	case 3:
		return "地市"

	case 4:
		return "县区"

	}
	return ""
}

func (c *orgOrganizationLevel) ToValue(text string) int {
	switch text {

	case "国家级":
		return 1

	case "省级":
		return 2

	case "地市":
		return 3

	case "县区":
		return 4

	}
	return 0
}
